package ar.com.huddleton.arquitectura.gcm;

import android.content.Context;
import android.content.Intent;
import android.support.v4.content.WakefulBroadcastReceiver;
import android.widget.Toast;

public class GCMReciever extends WakefulBroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		
		if(intent.getExtras().getString("tipo").equals("mensaje")){
			Toast.makeText(context, "LLego el mensaje:"+intent.getExtras().getString("mensaje"), Toast.LENGTH_LONG).show();
		}else if(intent.getExtras().getString("tipo").equals("deudor")){
			//llamar a un service que lo agregue a la BD
		}
		
		
	}

}
